package shotgun.my.sweetutil.redis;

/**
 * @author wulingming
 * 存放redis key
 **/
public class RedisLockKeySystem {
    public static final String SPLIT_STR = "#";

    /**
     * 返回：系统名:模块名:id串
     **/
    public static String join(CharSequence... elements) {
        return String.join(SPLIT_STR, RedisLockKeySystem.class.getSimpleName(), String.join(SPLIT_STR, elements));
    }


    public static String getKeyExamTestSubmitPaper(String memberId, String examId, String paperClassId) {
        return join("exam-test-submitPaper", memberId, examId, paperClassId);
    }

    public static String getInsertCreditDetailKey(String memberId, String businessId, Integer businessType) {
        return join("insert-CreditDetail", memberId, businessId, String.valueOf(businessType));
    }

//    public static void main(String[] args) {
//        System.out.println(getKeyExamTestSubmitPaper("id1", "id2", "id3"));
//    }

}
